package com.example.springboot.service.impl;


import com.example.springboot.mapper.AdRequestMapper;
import com.example.springboot.pojo.AdRequest;
import com.example.springboot.service.AdRequestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdRequestImpl implements AdRequestService {

    @Autowired
    private AdRequestMapper adRequestMapper;

    @Override
    public AdRequest findById(Integer id) {
        return adRequestMapper.findById(id);
    }

    @Override
    public void addAdRequest(String name, String email, String phoneNumber, String company, String adDetail) {
        adRequestMapper.addAdRequest(name,email,phoneNumber,company,adDetail);
    }

    @Override
    public AdRequest[] getAllAdRequest() {
        return adRequestMapper.getAllAdRequest();
    }

    @Override
    public void deleteAdRequest(Integer id) {
        adRequestMapper.deleteAdRequest(id);
    }

    @Override
    public void passAdRequest(Integer id) {
        adRequestMapper.passAdRequest(id);
    }

    @Override
    public void refuseAdRequest(Integer id) {
        adRequestMapper.refuseAdRequest(id);
    }
}
